#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	const int k = 8;
	int x[8];
	int y[8];
	double sum = 0;
	double ave = 0;
	int n = 0;
	int i = 0, j = 0;
	printf("x=?");
	for (i = 0; i < k; i++)
	{
		scanf("%d", &x[i]);
		sum += x[i];
	}
	(double)k;
	ave = sum / k;
	printf("ave=%lf\n", ave);
	for (i = 0; i < k; i++)
	{
		if (ave > x[i])
			n++;
	}
	printf("n=%d\n", n);
	for (i = 0; i < k; i++)
	{
		int c = 0;
		int flag = 1;
		for (c = 0; c <= i; c++)
		{
			if (x[i] == y[c]);
			flag = 0;
			break;
		}
		if (flag = 1)
		{
			y[j] = x[i];
			j++;
		}
	}
		printf("y=");
		for (i = 0; i < j; i++)
		{
			printf("%d ", y[i]);
		}
		printf("\n");
	return 0;
}